package br.com.knowledge.view.struts.actions;

import java.util.List;
import java.util.Map;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.ResultPath;
import org.apache.struts2.interceptor.SessionAware;
import org.apache.struts2.interceptor.validation.SkipValidation;
import org.hibernate.Session;

import br.com.knowledge.persistence.hibernate.entities.FntClasse;
import br.com.knowledge.persistence.hibernate.dao.FntClasseDAO;

import com.opensymphony.xwork2.ActionSupport;

@Namespace("/")
@ResultPath("/")
public class ClasseAction extends ActionSupport implements SessionAware {
	
	
	public void setSession(Map<String, Object> arg0) {
		// TODO Auto-generated method stub		
	}
	@Action(value = "cadastra-classe", results = {
			@Result(name = SUCCESS, location = "/pages/listarTiposDados.jsp"),
			@Result(name = ERROR, location = "/pages/cadastraTipoDadoErro.jsp"),
			@Result(name = INPUT, location = "/pages/cadastraTipoDado.jsp") })	
	public String criarClasse(){
		return SUCCESS;
	}
	@Action(value = "alterar-classe", results = {
			@Result(name = SUCCESS, location = "/pages/listarTiposDados.jsp"),
			@Result(name = ERROR, location = "/pages/cadastraTipoDadoErro.jsp"),
			@Result(name = INPUT, location = "/pages/cadastraTipoDado.jsp") })	
	public String alterarClasse(){
		return SUCCESS;
	}
	@Action(value = "listar-classe", results = {
			@Result(name = SUCCESS, location = "/pages/listarTiposDados.jsp"),
			@Result(name = ERROR, location = "/pages/cadastraTipoDadoErro.jsp"),
			@Result(name = INPUT, location = "/pages/cadastraTipoDado.jsp") })	
	public String listarClasse(){
		return SUCCESS;
	}
}
